import { createRouter, createWebHashHistory } from 'vue-router'

import LoginView from '../views/Login.vue'
import Register from '../views/Register'
import Home from '../components/TopLine'
import DetailPage from "@/views/DetailView";
const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/login',
    component: LoginView
  },
  {
    path: '/register',
    component: Register
  },
  {
    path: '/home',
    component: Home,
  },
  {
    path: '/detail',
    component: DetailPage
  }
]

const router = createRouter({
  mode: 'history',
  history: createWebHashHistory(),
  routes
})

export default router
